package com.sixth.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @program: project01
 * @description:
 * @author: 老魏
 * @create: 2021-12-18 10:55
 **/
@Data
public class Warehousing implements Serializable {
    private Integer id;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date date;
    private String status;
    private String staffid;
    private Integer branchid;
    private String branchname;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date dates;
    private Integer goodsid;
    private Staff staff;
    private Branch branch;
    private Integer num;

    private Integer bid;
    private String remark;

    public Integer getId() {
        return this.id;
    }

    public Date getDate() {
        return this.date;
    }

    public String getStatus() {
        return this.status;
    }

    public String getStaffid() {
        return this.staffid;
    }

    public Integer getBranchid() {
        return this.branchid;
    }

    public String getBranchname() {
        return this.branchname;
    }

    public Date getDates() {
        return this.dates;
    }

    public Integer getGoodsid() {
        return this.goodsid;
    }

    public Staff getStaff() {
        return this.staff;
    }

    public Branch getBranch() {
        return this.branch;
    }

    public Integer getNum() {
        return this.num;
    }

    public Integer getBid() {
        return this.bid;
    }

    public String getRemark() {
        return this.remark;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    public void setDate(Date date) {
        this.date = date;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public void setStaffid(String staffid) {
        this.staffid = staffid;
    }

    public void setBranchid(Integer branchid) {
        this.branchid = branchid;
    }

    public void setBranchname(String branchname) {
        this.branchname = branchname;
    }

    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    public void setDates(Date dates) {
        this.dates = dates;
    }

    public void setGoodsid(Integer goodsid) {
        this.goodsid = goodsid;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }

    public void setBranch(Branch branch) {
        this.branch = branch;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public void setBid(Integer bid) {
        this.bid = bid;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof Warehousing)) {
            return false;
        } else {
            Warehousing other = (Warehousing)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label167: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label167;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label167;
                    }

                    return false;
                }

                Object this$branchid = this.getBranchid();
                Object other$branchid = other.getBranchid();
                if (this$branchid == null) {
                    if (other$branchid != null) {
                        return false;
                    }
                } else if (!this$branchid.equals(other$branchid)) {
                    return false;
                }

                label153: {
                    Object this$goodsid = this.getGoodsid();
                    Object other$goodsid = other.getGoodsid();
                    if (this$goodsid == null) {
                        if (other$goodsid == null) {
                            break label153;
                        }
                    } else if (this$goodsid.equals(other$goodsid)) {
                        break label153;
                    }

                    return false;
                }

                Object this$num = this.getNum();
                Object other$num = other.getNum();
                if (this$num == null) {
                    if (other$num != null) {
                        return false;
                    }
                } else if (!this$num.equals(other$num)) {
                    return false;
                }

                label139: {
                    Object this$bid = this.getBid();
                    Object other$bid = other.getBid();
                    if (this$bid == null) {
                        if (other$bid == null) {
                            break label139;
                        }
                    } else if (this$bid.equals(other$bid)) {
                        break label139;
                    }

                    return false;
                }

                Object this$date = this.getDate();
                Object other$date = other.getDate();
                if (this$date == null) {
                    if (other$date != null) {
                        return false;
                    }
                } else if (!this$date.equals(other$date)) {
                    return false;
                }

                label125: {
                    Object this$status = this.getStatus();
                    Object other$status = other.getStatus();
                    if (this$status == null) {
                        if (other$status == null) {
                            break label125;
                        }
                    } else if (this$status.equals(other$status)) {
                        break label125;
                    }

                    return false;
                }

                label118: {
                    Object this$staffid = this.getStaffid();
                    Object other$staffid = other.getStaffid();
                    if (this$staffid == null) {
                        if (other$staffid == null) {
                            break label118;
                        }
                    } else if (this$staffid.equals(other$staffid)) {
                        break label118;
                    }

                    return false;
                }

                Object this$branchname = this.getBranchname();
                Object other$branchname = other.getBranchname();
                if (this$branchname == null) {
                    if (other$branchname != null) {
                        return false;
                    }
                } else if (!this$branchname.equals(other$branchname)) {
                    return false;
                }

                label104: {
                    Object this$dates = this.getDates();
                    Object other$dates = other.getDates();
                    if (this$dates == null) {
                        if (other$dates == null) {
                            break label104;
                        }
                    } else if (this$dates.equals(other$dates)) {
                        break label104;
                    }

                    return false;
                }

                label97: {
                    Object this$staff = this.getStaff();
                    Object other$staff = other.getStaff();
                    if (this$staff == null) {
                        if (other$staff == null) {
                            break label97;
                        }
                    } else if (this$staff.equals(other$staff)) {
                        break label97;
                    }

                    return false;
                }

                Object this$branch = this.getBranch();
                Object other$branch = other.getBranch();
                if (this$branch == null) {
                    if (other$branch != null) {
                        return false;
                    }
                } else if (!this$branch.equals(other$branch)) {
                    return false;
                }

                Object this$remark = this.getRemark();
                Object other$remark = other.getRemark();
                if (this$remark == null) {
                    if (other$remark != null) {
                        return false;
                    }
                } else if (!this$remark.equals(other$remark)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof Warehousing;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $branchid = this.getBranchid();
        result = result * 59 + ($branchid == null ? 43 : $branchid.hashCode());
        Object $goodsid = this.getGoodsid();
        result = result * 59 + ($goodsid == null ? 43 : $goodsid.hashCode());
        Object $num = this.getNum();
        result = result * 59 + ($num == null ? 43 : $num.hashCode());
        Object $bid = this.getBid();
        result = result * 59 + ($bid == null ? 43 : $bid.hashCode());
        Object $date = this.getDate();
        result = result * 59 + ($date == null ? 43 : $date.hashCode());
        Object $status = this.getStatus();
        result = result * 59 + ($status == null ? 43 : $status.hashCode());
        Object $staffid = this.getStaffid();
        result = result * 59 + ($staffid == null ? 43 : $staffid.hashCode());
        Object $branchname = this.getBranchname();
        result = result * 59 + ($branchname == null ? 43 : $branchname.hashCode());
        Object $dates = this.getDates();
        result = result * 59 + ($dates == null ? 43 : $dates.hashCode());
        Object $staff = this.getStaff();
        result = result * 59 + ($staff == null ? 43 : $staff.hashCode());
        Object $branch = this.getBranch();
        result = result * 59 + ($branch == null ? 43 : $branch.hashCode());
        Object $remark = this.getRemark();
        result = result * 59 + ($remark == null ? 43 : $remark.hashCode());
        return result;
    }

    public String toString() {
        return "Warehousing(id=" + this.getId() + ", date=" + this.getDate() + ", status=" + this.getStatus() + ", staffid=" + this.getStaffid() + ", branchid=" + this.getBranchid() + ", branchname=" + this.getBranchname() + ", dates=" + this.getDates() + ", goodsid=" + this.getGoodsid() + ", staff=" + this.getStaff() + ", branch=" + this.getBranch() + ", num=" + this.getNum() + ", bid=" + this.getBid() + ", remark=" + this.getRemark() + ")";
    }

    public Warehousing(Integer id, Date date, String status, String staffid, Integer branchid, String branchname, Date dates, Integer goodsid, Staff staff, Branch branch, Integer num, Integer bid, String remark) {
        this.id = id;
        this.date = date;
        this.status = status;
        this.staffid = staffid;
        this.branchid = branchid;
        this.branchname = branchname;
        this.dates = dates;
        this.goodsid = goodsid;
        this.staff = staff;
        this.branch = branch;
        this.num = num;
        this.bid = bid;
        this.remark = remark;
    }

    public Warehousing() {
    }
}
